package com.example.aijiancece.database.entity;

import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import java.util.UUID;

@Entity(tableName = "history")
public class HistoryEntity {
    @PrimaryKey
    @NonNull
    private String id;
    private String content;
    private String result;
    private String analysis;
    private long timestamp;

    public HistoryEntity(@NonNull String content, String result, String analysis, long timestamp) {
        this.id = UUID.randomUUID().toString();
        this.content = content;
        this.result = result;
        this.analysis = analysis;
        this.timestamp = timestamp;
    }

    @NonNull
    public String getId() {
        return id;
    }

    public void setId(@NonNull String id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getAnalysis() {
        return analysis;
    }

    public void setAnalysis(String analysis) {
        this.analysis = analysis;
    }

    public long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(long timestamp) {
        this.timestamp = timestamp;
    }
} 